   var lv_position;

	function alertContents(http_request) {
		var xmlDocument = http_request.responseXML;

/*
alert(
http_request.responseText
);
*/
		//put returned XML in the textarea
//		$('result').value = http_request.responseText;
		var newrating = xmlDocument.getElementsByTagName('row')[0].attributes.getNamedItem("newrating").value;
		var yourrating = xmlDocument.getElementsByTagName('row')[0].attributes.getNamedItem("yourrating").value;
		var newvt = xmlDocument.getElementsByTagName('row')[0].attributes.getNamedItem("newvt").value;
		var newwt = xmlDocument.getElementsByTagName('row')[0].attributes.getNamedItem("newwt").value;

		$('current-rating'+lv_position).style.width = (newvt/newwt) * 25;
		$('ratingOverall').innerHTML = (newvt/newwt).toFixed(2);
		$('yourRating').innerHTML = yourrating;
   }
   
   function ratethis(obj, rating, pid, position) {
		lv_position=position;
		var url = '/ajax/gallery.aspx';
		var pars = "ajax=true" 
					+ "&rating=" + rating 
					+ "&pid=" + pid ;
		var myAjax = new Ajax.Request(
			url, 
			{
				method: 'get', 
				parameters: pars, 
				onComplete: alertContents
			});
   }
